package com.yunhui.config;


import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

public class IntepoterConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration is = new InterceptorRegistration(new MyIntepoter());

        //is.addPathPatterns(""); 方法是添加需要拦截的请求
        //is.excludePathPatterns(""); //此方法是添加不需要拦截的请求
    }
}
